#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main(void)
{
	double d = 0, a = 0, b = 0;
	scanf("%lf", &d);
	a = pow(d, 0.5);
	b = pow((d + 1), 2) + 2 * d + 1 / d;
	if (d<0){
		printf("f(%.2lf) = %.2lf", d, b);
	}
	else{
		printf("f(%.2lf) = %.2lf", d, a);
	}
	return 0;
}